/* 后台管理专用样式 */

/* 美化的确认删除弹窗 */
.delete-confirm-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.delete-confirm-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    margin: 0;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

.delete-confirm-header {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 25px 30px;
    text-align: center;
    position: relative;
}

.delete-confirm-header::before {
    content: '⚠️';
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
    animation: bounce 0.6s ease-in-out infinite alternate;
}

.delete-confirm-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.delete-confirm-body {
    padding: 30px;
    text-align: center;
}

.delete-confirm-message {
    font-size: 1.1em;
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 10px;
}

.delete-confirm-category {
    font-weight: bold;
    color: #e74c3c;
    font-size: 1.2em;
    margin: 15px 0;
    padding: 10px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.delete-confirm-warning {
    font-size: 0.95em;
    color: #7f8c8d;
    margin-top: 15px;
    font-style: italic;
}

.delete-confirm-actions {
    padding: 0 30px 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.delete-confirm-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.delete-confirm-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.delete-confirm-btn:hover::before {
    left: 100%;
}

.btn-confirm-delete {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-confirm-delete:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
}

.btn-cancel-delete {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.4);
}

.btn-cancel-delete:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.6);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .delete-confirm-content {
        width: 95%;
        margin: 20px auto;
    }

    .delete-confirm-header,
    .delete-confirm-body {
        padding: 20px;
    }

    .delete-confirm-actions {
        padding: 0 20px 20px;
        flex-direction: column;
    }

    .delete-confirm-btn {
        width: 100%;
    }
}

/* 成功提示弹窗样式 */
.success-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.success-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    margin: 0;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

.success-header {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 25px 30px;
    text-align: center;
    position: relative;
}

.success-header::before {
    content: '✅';
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
    animation: bounce 0.6s ease-in-out infinite alternate;
}

.success-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.success-body {
    padding: 30px;
    text-align: center;
}

.success-message-text {
    font-size: 1.1em;
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 10px;
}

.success-actions {
    padding: 0 30px 30px;
    display: flex;
    justify-content: center;
}

.success-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.success-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.success-btn:hover::before {
    left: 100%;
}

.btn-success-ok {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-success-ok:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

/* 响应式设计 - 成功弹窗 */
@media (max-width: 480px) {
    .success-content {
        width: 95%;
        margin: 20px auto;
    }

    .success-header,
    .success-body {
        padding: 20px;
    }

    .success-actions {
        padding: 0 20px 20px;
    }

    .success-btn {
        width: 100%;
    }
}

/* 警告提示弹窗样式 */
.warning-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.warning-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    margin: 0;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

.warning-header {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    padding: 25px 30px;
    text-align: center;
    position: relative;
}

.warning-header::before {
    content: '⚠️';
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
    animation: bounce 0.6s ease-in-out infinite alternate;
}

.warning-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.warning-body {
    padding: 30px;
    text-align: center;
}

.warning-message-text {
    font-size: 1.1em;
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 10px;
}

.warning-actions {
    padding: 0 30px 30px;
    display: flex;
    justify-content: center;
}

.warning-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.warning-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.warning-btn:hover::before {
    left: 100%;
}

.btn-warning-ok {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.btn-warning-ok:hover {
    background: linear-gradient(135deg, #f57c00, #ef6c00);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.6);
}

/* 响应式设计 - 警告弹窗 */
@media (max-width: 480px) {
    .warning-content {
        width: 95%;
        margin: 20px auto;
    }

    .warning-header,
    .warning-body {
        padding: 20px;
    }

    .warning-actions {
        padding: 0 20px 20px;
    }

    .warning-btn {
        width: 100%;
    }
}

/* 后台头部 */
.admin-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.admin-header h1 {
    margin: 0;
    font-size: 1.8em;
    font-weight: 600;
}

.admin-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* 允许换行以适应小屏幕 */
}

.admin-nav .nav-btn {
    padding: 10px 20px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    /* 重写main.css中的冲突样式 */
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
    white-space: nowrap;
    min-width: auto;
}

.admin-nav .nav-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* 类别管理样式 */
.category-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.category-tree-container {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 25px;
    margin-top: 20px;
    border: 1px solid #e3f2fd;
}

.category-tree {
    min-height: 400px;
    position: relative;
}

.category-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #ffffff;
    transition: box-shadow 0.2s ease;
    position: relative;
}

.category-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
}

.category-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #6b7280;
}

.category-toggle:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.category-toggle.expanded {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.category-toggle.no-children {
    border-color: #d1fae5;
    background: #f0fdf4;
    color: #16a34a;
    cursor: default;
}

.category-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category-icon {
    font-size: 20px;
    margin-right: 5px;
}

.category-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
}

.category-level {
    background: #e0e7ff;
    color: #3730a3;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-level.level-1 {
    background: #d1fae5;
    color: #166534;
}

.category-level.level-2 {
    background: #dbeafe;
    color: #1e40af;
}

.category-level.level-3 {
    background: #fef3c7;
    color: #92400e;
}

.category-level.level-4 {
    background: #fce7f3;
    color: #be185d;
}

.category-path {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
    background: #f9fafb;
    padding: 2px 8px;
    border-radius: 4px;
}

.category-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.category-item:hover .category-actions {
    opacity: 1;
}

.category-action-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-action-btn:hover {
    background: #f9fafb;
    border-color: #3b82f6;
    color: #3b82f6;
}

.category-action-btn.add {
    border-color: #16a34a;
    color: #16a34a;
}

.category-action-btn.add:hover {
    background: #16a34a;
    color: white;
}

.category-action-btn.edit {
    border-color: #f59e0b;
    color: #f59e0b;
}

.category-action-btn.edit:hover {
    background: #f59e0b;
    color: white;
}

.category-action-btn.move {
    border-color: #3b82f6;
    color: #3b82f6;
}

.category-action-btn.move:hover {
    background: #3b82f6;
    color: white;
}

.category-action-btn.delete {
    border-color: #ef4444;
    color: #ef4444;
}

.category-action-btn.delete:hover {
    background: #ef4444;
    color: white;
}

.category-children {
    padding-left: 40px;
    border-left: 2px solid #f3f4f6;
    margin-left: 20px;
    margin-top: 8px;
    display: none;
}

.category-children.expanded {
    display: block;
}

.no-categories {
    text-align: center;
    color: #6b7280;
    padding: 60px 20px;
    font-style: italic;
    font-size: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #d1d5db;
}

/* 统计信息栏 */
.category-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.stat-icon {
    font-size: 24px;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-left: auto;
}

/* 搜索结果高亮 */
.search-highlight {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
}

.search-match {
    background: #fbbf24;
    color: #92400e;
    font-weight: bold;
    padding: 1px 3px;
    border-radius: 2px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .category-info {
        width: 100%;
    }

    .category-actions {
        opacity: 1;
        width: 100%;
        justify-content: flex-end;
    }

    .category-children {
        padding-left: 15px;
        margin-left: 15px;
    }

    .category-stats-bar {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .category-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
}

.tree-header {
    border-bottom: 2px solid #e1f5fe;
    padding-bottom: 20px;
    margin-bottom: 25px;
    background: linear-gradient(90deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 10px;
    padding: 15px 20px;
}

.tree-info {
    display: flex;
    gap: 30px;
    font-size: 14px;
    color: #37474f;
    font-weight: 500;
}

.tree-info span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tree-info span::before {
    content: "📊";
    font-size: 16px;
}

.tree-info span:nth-child(2)::before {
    content: "📏";
}

.category-tree {
    min-height: 400px;
    position: relative;
}

.category-item {
    border: 2px solid transparent;
    border-radius: 15px;
    margin-bottom: 10px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.4s ease-out;
    animation-fill-mode: both;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.08),
        0 1px 3px rgba(0,0,0,0.06);
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4fc3f7, #29b6f6, #03a9f4);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 15px 15px 0 0;
}

.category-item:hover::before {
    transform: scaleX(1);
}

.category-item:hover {
    border-color: #42a5f5;
    box-shadow:
        0 8px 30px rgba(66, 165, 245, 0.15),
        0 4px 12px rgba(66, 165, 245, 0.1);
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.category-item.expanded {
    border-color: #4caf50;
    background: linear-gradient(145deg, #f1f8e9 0%, #ffffff 100%);
    box-shadow:
        0 6px 20px rgba(76, 175, 80, 0.12),
        0 3px 8px rgba(76, 175, 80, 0.08);
    transform: scale(1.01);
}

.category-item.expanded::before {
    background: linear-gradient(90deg, #81c784, #66bb6a, #4caf50);
    transform: scaleX(1);
}

.category-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.category-header:hover {
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.05) 0%, rgba(156, 39, 176, 0.05) 100%);
}

.category-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    border: 2px solid #e0e7ff;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #64748b;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 8px rgba(100, 116, 139, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.category-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-toggle:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: scale(1.1);
    box-shadow:
        0 4px 20px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.category-toggle:hover::before {
    opacity: 1;
}

.category-toggle.expanded {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border-color: #1d4ed8;
    transform: rotate(90deg) scale(1.05);
    box-shadow:
        0 4px 20px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.category-toggle.expanded::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 1;
}

.category-toggle.no-children {
    border: 2px solid #dcfce7;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    cursor: default;
    box-shadow:
        0 2px 8px rgba(34, 197, 94, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: none !important;
}

.category-toggle.no-children::before {
    content: "🌿";
    font-size: 14px;
    color: #16a34a;
    opacity: 0.8;
}

.category-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category-icon {
    font-size: 20px;
    margin-right: 5px;
    display: inline-block;
    min-width: 24px;
    text-align: center;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
    transition: transform 0.2s ease;
}

.category-item:hover .category-icon {
    transform: scale(1.1);
}

.category-name {
    font-weight: 600;
    color: #263238;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.category-level {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0d47a1;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #90caf9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(13, 71, 161, 0.1);
}

.category-level.level-1 {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c8 100%);
    color: #2e7d32;
    border-color: #81c784;
}
.category-level.level-2 {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border-color: #64b5f6;
}
.category-level.level-3 {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #ef6c00;
    border-color: #ffb74d;
}
.category-level.level-4 {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    color: #c2185b;
    border-color: #f06292;
}

.category-path {
    font-size: 12px;
    color: #78909c;
    font-style: italic;
    background: rgba(120, 144, 156, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(120, 144, 156, 0.2);
}

.category-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    flex-wrap: wrap;
}

.category-item:hover .category-actions {
    opacity: 1;
}

.category-action-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.category-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.category-action-btn.add {
    border-color: #4caf50;
    color: #2e7d32;
    background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%);
}
.category-action-btn.add:hover {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.category-action-btn.edit {
    border-color: #ff9800;
    color: #ef6c00;
    background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
}
.category-action-btn.edit:hover {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.category-action-btn.move {
    border-color: #2196f3;
    color: #1565c0;
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
}
.category-action-btn.move:hover {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.category-action-btn.delete {
    border-color: #f44336;
    color: #d32f2f;
    background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
}
.category-action-btn.delete:hover {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.category-children {
    padding-left: 45px;
    margin-left: 30px;
    margin-top: 12px;
    display: none;
    position: relative;
    border-left: 2px solid #e3f2fd;
}

.category-children::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        #81d4fa 0%,
        #e3f2fd 50%,
        transparent 100%
    );
    opacity: 0.8;
}

.category-children::after {
    content: '';
    position: absolute;
    left: -12px;
    top: -6px;
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #81d4fa 0%, #e3f2fd 100%);
    border-radius: 1px;
}

/* 为每个子项添加连接线 */
.category-children .category-item::before {
    content: '';
    position: absolute;
    left: -47px;
    top: 50%;
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, #e3f2fd 0%, #81d4fa 100%);
    border-radius: 1px;
    opacity: 0.6;
    z-index: 1;
}

.category-children.expanded {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        max-height: 1000px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
        max-height: 1000px;
    }
    to {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
        max-height: 0;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* 为类别项添加入场动画 */
.category-item {
    animation: fadeInScale 0.4s ease-out;
    animation-fill-mode: both;
}

.category-item:nth-child(1) { animation-delay: 0.1s; }
.category-item:nth-child(2) { animation-delay: 0.2s; }
.category-item:nth-child(3) { animation-delay: 0.3s; }
.category-item:nth-child(4) { animation-delay: 0.4s; }
.category-item:nth-child(5) { animation-delay: 0.5s; }

/* 为展开/收起添加更流畅的动画 */
.category-children.expanded {
    display: block;
    animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-children.collapsing {
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 为操作按钮添加悬浮动画 */
.category-action-btn {
    position: relative;
    overflow: hidden;
}

.category-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

.category-action-btn:hover::before {
    left: 100%;
}

/* 为图标添加旋转动画 */
.category-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-item:hover .category-icon {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* 为级别标签添加呼吸效果 */
.category-level {
    position: relative;
    overflow: hidden;
}

.category-level::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.category-item:hover .category-level::before {
    transform: translateX(100%);
}

/* 为搜索高亮添加动画 */
.search-highlight {
    position: relative;
    overflow: hidden;
}

.search-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 193, 7, 0) 0%,
        rgba(255, 193, 7, 0.3) 50%,
        rgba(255, 193, 7, 0) 100%
    );
    animation: shimmer 2s infinite;
}

/* 为路径预览添加打字机效果 */
.path-preview {
    position: relative;
    overflow: hidden;
}

.path-preview::after {
    content: '|';
    position: absolute;
    right: 5px;
    animation: blink 1s infinite;
    color: #3b82f6;
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.no-categories {
    text-align: center;
    color: #78909c;
    padding: 80px 20px;
    font-style: italic;
    font-size: 16px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 15px;
    border: 2px dashed #bdbdbd;
}

.no-categories::before {
    content: "📁";
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

/* 类别路径导航 */
.category-breadcrumb {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    border: 2px solid #c8e6c8;
    border-radius: 15px;
    padding: 20px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(200, 230, 200, 0.2);
}

.breadcrumb-label {
    font-weight: 600;
    color: #2e7d32;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.breadcrumb-label::before {
    content: "🧭 ";
    margin-right: 5px;
}

.breadcrumb-path {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #c8e6c8;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    color: #2e7d32;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(46, 125, 50, 0.1);
}

.breadcrumb-separator {
    color: #4caf50;
    font-size: 14px;
    font-weight: bold;
}

/* 模态框样式增强 */
.path-preview {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #90caf9;
    border-radius: 10px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #1565c0;
    margin-top: 10px;
    box-shadow: inset 0 2px 5px rgba(33, 150, 243, 0.1);
    font-weight: 500;
}

.path-preview::before {
    content: "📂 ";
    margin-right: 5px;
}

.category-info {
    background: linear-gradient(135deg, #e7f3ff 0%, #f0f8ff 100%);
    border: 2px solid #81d4fa;
    border-radius: 10px;
    padding: 15px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(129, 212, 250, 0.1);
}

/* 搜索结果样式 */
.search-highlight {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 20%, #fff3e0 100%) !important;
    border-color: #ff9800 !important;
    animation: searchPulse 2s ease-in-out infinite;
}

@keyframes searchPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(255, 152, 0, 0); }
}

.search-match {
    background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 100%);
    color: #e65100;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(255, 193, 7, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .category-info {
        width: 100%;
    }

    .category-actions {
        opacity: 1;
        width: 100%;
        justify-content: flex-end;
    }

    .category-children {
        padding-left: 15px;
        margin-left: 15px;
    }

    .tree-info {
        flex-direction: column;
        gap: 10px;
    }

    .category-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

.admin-nav .nav-btn.active {
    background: white;
    color: #2c3e50;
    border-color: white;
}

.admin-nav .nav-btn.secondary {
    background: #3498db;
    border-color: #3498db;
}

.admin-nav .nav-btn.secondary:hover {
    background: #2980b9;
    border-color: #2980b9;
}

/* 页面区域 */
.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
}

.section-header h2 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.5em;
}

/* 按钮样式 */
.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* 控制区域 */
.admin-controls {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.search-section {
    flex: 1;
}

.search-section input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ecf0f1;
    border-radius: 25px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-section input:focus {
    outline: none;
    border-color: #3498db;
}

.filter-section {
    display: flex;
    gap: 15px;
}

.filter-section select {
    padding: 10px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 120px;
}

.filter-section select:focus {
    outline: none;
    border-color: #3498db;
}

/* 人员网格 */
.personnel-grid {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.grid-header {
    background: #34495e;
    color: white;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1.2fr 1fr;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 14px;
}

.grid-content {
    max-height: 500px;
    overflow-y: auto;
}

.personnel-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1.2fr 1fr;
    padding: 15px 20px;
    border-bottom: 1px solid #ecf0f1;
    transition: background-color 0.3s;
    align-items: center;
}

.personnel-item:hover {
    background: #f8f9fa;
}

.personnel-item:last-child {
    border-bottom: none;
}

.personnel-name {
    font-weight: 600;
    color: #2c3e50;
}

.personnel-role {
    background: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    text-align: center;
    max-width: 80px;
}

.personnel-department {
    background: #16a085;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    text-align: center;
    max-width: 60px;
}

.personnel-phone {
    color: #7f8c8d;
    font-size: 13px;
}

.personnel-date {
    color: #95a5a6;
    font-size: 12px;
}

.personnel-actions {
    display: flex;
    gap: 8px;
}

.btn-edit, .btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit {
    background: #f39c12;
    color: white;
}

.btn-edit:hover {
    background: #e67e22;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

/* 无数据状态 */
.no-data {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
    font-style: italic;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.required {
    color: #e74c3c;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: flex-end;
}

/* 统计报表样式 */
.stats-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.stats-controls input {
    padding: 10px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.stats-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.stats-card h3 {
    background: #34495e;
    color: white;
    margin: 0;
    padding: 15px 20px;
    font-size: 1.1em;
}

.stats-content {
    padding: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: #2c3e50;
}

.stat-value {
    font-weight: 600;
    color: #3498db;
    font-size: 1.1em;
}

.workload-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
}

.workload-item:last-child {
    border-bottom: none;
}

.workload-name {
    font-weight: 500;
    color: #2c3e50;
}

.workload-count {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-section {
        width: 100%;
    }
    
    .filter-section select {
        flex: 1;
    }
    
    .grid-header,
    .personnel-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .grid-header {
        display: none;
    }
    
    .personnel-item {
        padding: 20px;
        background: white;
        margin-bottom: 10px;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .personnel-item > div {
        margin-bottom: 8px;
    }

    .personnel-actions {
        justify-content: center;
        margin-top: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* 数据库管理样式 */
.database-controls {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.control-group {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.control-group h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.button-group button {
    min-width: 120px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button-group .btn-primary {
    background: #3498db;
    color: white;
}

.button-group .btn-primary:hover {
    background: #2980b9;
}

.button-group .btn-secondary {
    background: #95a5a6;
    color: white;
}

.button-group .btn-secondary:hover {
    background: #7f8c8d;
}

.button-group .btn-danger {
    background: #e74c3c;
    color: white;
}

.button-group .btn-danger:hover {
    background: #c0392b;
}

#database-section .db-status {
    margin-left: auto;
}

@media (max-width: 768px) {
    .control-group {
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
        align-items: stretch;
    }

    .button-group button {
        min-width: unset;
        width: 100%;
    }
}

/* 任务类别详情页面样式 */
.task-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.task-controls select {
    padding: 8px 12px;
    border: 2px solid #e0e6ed;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 150px;
}

.task-controls select:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* 任务统计卡片 */
.task-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
    border: 1px solid #e0e6ed;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.stat-card h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.stat-number.completed {
    color: #27AE60;
}

.stat-number.in-progress {
    color: #F39C12;
}

.stat-number.pending {
    color: #E74C3C;
}

/* 任务网格样式 */
.tasks-grid {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e0e6ed;
}

.tasks-grid .grid-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr 1.2fr 1.2fr 1fr 1fr;
    gap: 15px;
    padding: 20px;
    background: #f8fafc;
    border-bottom: 2px solid #e0e6ed;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.tasks-grid .grid-content {
    max-height: 600px;
    overflow-y: auto;
}

.task-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr 1.2fr 1.2fr 1fr 1fr;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid #e0e6ed;
    align-items: center;
    transition: background-color 0.2s ease;
}

.task-item:hover {
    background-color: #f8fafc;
}

.task-item:last-child {
    border-bottom: none;
}

.task-title {
    font-weight: 600;
    color: #2c3e50;
    word-break: break-word;
}

.task-category {
    padding: 4px 8px;
    background: #e8f4fd;
    color: #2980b9;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.task-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-status.pending {
    background: #fee2e2;
    color: #dc2626;
}

.task-status.in-progress {
    background: #fef3c7;
    color: #d97706;
}

.task-status.completed {
    background: #dcfce7;
    color: #16a34a;
}

.task-assignees {
    font-size: 13px;
    color: #666;
}

.task-date {
    font-size: 13px;
    color: #666;
}

.task-duration {
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.task-duration.highlight {
    color: #e74c3c;
    background: #fee2e2;
    padding: 4px 8px;
    border-radius: 4px;
}

.task-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-view {
    padding: 6px 12px;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-view:hover {
    background: #357abd;
}

/* 响应式设计 - 任务页面 */
@media (max-width: 1024px) {
    .task-stats-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .tasks-grid .grid-header,
    .task-item {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .tasks-grid .grid-header {
        display: none;
    }

    .task-item {
        display: block;
        padding: 15px;
    }

    .task-item > div {
        margin-bottom: 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .task-item > div::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
}

/* 响应式设计 - Admin导航 */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .admin-nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .admin-nav .nav-btn {
        padding: 8px 16px;
        font-size: 12px;
        min-width: auto;
    }
}

/* 类别任务完成率统计 - 左右2列布局 */
.category-stats-layout {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    min-height: 500px;
}

.category-stats-left {
    width: 25%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8f9fa 0%, #f0f2f5 100%);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow-y: auto;
}

.category-stats-left h3 {
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.category-stats-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-stats-item {
    padding: 12px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    border-left: 4px solid transparent;
    color: #555;
    font-size: 14px;
    background: white;
}

.category-stats-item:hover {
    background-color: #f0f8ff;
    border-left-color: #3498db;
    padding-left: 17px;
}

.category-stats-item.active {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-left-color: #2980b9;
    font-weight: 600;
}

.category-stats-right {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-stats-display {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.stats-circle-container {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.stats-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stats-circle.completed {
    background: conic-gradient(#27ae60 0deg, #27ae60 var(--percentage), #ecf0f1 var(--percentage), #ecf0f1 360deg);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.stats-circle.incompleted {
    background: conic-gradient(#e74c3c 0deg, #e74c3c var(--percentage), #ecf0f1 var(--percentage), #ecf0f1 360deg);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

.stats-circle::after {
    content: '';
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border-radius: 50%;
    background: white;
    position: absolute;
    top: 10px;
    left: 10px;
}

.stats-circle-inner {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stats-circle-percentage {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
}

.stats-circle-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 600;
}

.stats-circle-count {
    font-size: 12px;
    color: #95a5a6;
}

.category-stats-info {
    width: 100%;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.stats-info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.stats-info-row:last-child {
    border-bottom: none;
}

.stats-info-label {
    color: #555;
    font-weight: 600;
}

.stats-info-value {
    color: #2c3e50;
    font-weight: 700;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .category-stats-layout {
        flex-direction: column;
        min-height: auto;
    }

    .category-stats-left {
        width: 100%;
        max-height: 300px;
    }

    .stats-circle {
        width: 150px;
        height: 150px;
    }

    .stats-circle-percentage {
        font-size: 28px;
    }

    .status-circles-group {
        flex-direction: column;
        gap: 20px;
    }

    .status-circle-wrapper {
        margin-bottom: 10px;
    }
}

/* 进行中状态的圆形样式 */
.stats-circle.in-progress {
    background: conic-gradient(#f39c12 0deg, #f39c12 var(--percentage), #ecf0f1 var(--percentage), #ecf0f1 360deg);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
}

/* 待办状态的圆形样式 */
.stats-circle.pending {
    background: conic-gradient(#e74c3c 0deg, #e74c3c var(--percentage), #ecf0f1 var(--percentage), #ecf0f1 360deg);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

/* 三个圆形的横向布局 */
.status-circles-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* 单个圆形包装器 */
.status-circle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.status-circle-count {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

/* ===== 上下班时间设置样式 ===== */

/* 人员管理头部按钮容器 */
.personnel-header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 上下班时间模态框 */
.working-hours-modal-content {
    max-width: 900px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

/* 时间设置区域 */
.working-hours-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f9fafb;
}

.working-hours-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

/* 人员时间搜索框 */
.personnel-hours-controls {
    margin-bottom: 15px;
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 14px;
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* 人员时间列表 */
.personnel-hours-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
}

/* 时间表格样式 */
.hours-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hours-grid-item {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1.5fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 12px 15px;
    background-color: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.hours-grid-item:hover {
    background-color: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hours-grid-item-name {
    font-weight: 500;
    color: #2c3e50;
}

.hours-grid-item-role {
    font-size: 12px;
    color: #7f8c8d;
}

.hours-grid-item-time-display {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #34495e;
    padding: 6px 10px;
    background-color: #ecf0f1;
    border-radius: 4px;
}

.hours-grid-item-time-display.using-global {
    color: #3498db;
    background-color: #e3f2fd;
}

.hours-grid-item-actions {
    display: flex;
    gap: 5px;
}

.hours-grid-item-actions button {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #3498db;
    color: white;
}

.hours-grid-item-actions button:hover {
    background-color: #2980b9;
}

.hours-grid-item-actions button.btn-delete {
    background-color: #e74c3c;
}

.hours-grid-item-actions button.btn-delete:hover {
    background-color: #c0392b;
}

/* 编辑个人时间模态框 */
#edit-person-hours-modal {
    z-index: 2001;
}

#edit-person-hours-modal .modal-content {
    max-width: 400px;
}

.person-name-display {
    padding: 10px;
    background-color: #ecf0f1;
    border-radius: 4px;
    font-weight: 500;
    color: #2c3e50;
}

/* 全局使用复选框样式 */
#edit-person-hours-modal .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

#edit-person-hours-modal .form-group input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* 移动设备响应式调整 */
@media (max-width: 768px) {
    .personnel-header-buttons {
        flex-direction: column;
    }

    .personnel-header-buttons button {
        width: 100%;
    }

    .working-hours-modal-content {
        max-width: 95vw !important;
    }

    .hours-grid-item {
        grid-template-columns: 1fr;
    }

    .hours-grid-item-name {
        font-weight: 600;
    }

    .hours-grid-item-time-display,
    .hours-grid-item-actions {
        justify-content: space-between;
    }

    .hours-grid-item-actions {
        flex-direction: row;
    }
}
